Some refactoring and making class methods private