refactoring out private methods from Object prototype