Plus some mutex and config refactoring along the way... Signed-off-by: Michael Mayer <michael@liquidbytes.net>