small refactorings and added ToDo comments