minor refactoring, removing commented code