Moving methods to prototypes