changed most of the classes to be defines