perf: put properties on prototypes of core object

This speeds up object creation.