refactorings, some fixes and comments