Implement our own class system to remove Prototype dependency