renamed some classes and cleaned the code.