Move all shared methods to prototype