Changed visibility of some methods to private, removed a useless function