Fixed most of the component library and moved some classes and objects to the lib folder