porting over controllers and test classes. Not fully functional