cleaned up controller and refactored dependend classes