Syncing the prototypes here works because local functions are hoisted.