Minor fixes in codestyle, refactoring & mark todos