Added new and edit functionality, as well as testing for model and controller