Added prototypeJS to help with the class creation. Cleaned up some of
the code.