Refactors methods to prototype