changed the visibility of some methods
some small refactorings