cleaned up models and controller