all controllers and models refactored