Models + Controllers

Added the new models and controllers. Code cleaned up in various files.