Small refactorings, added logmanager, fixed several bugs, ..