Moved object methods into prototypes.