Fixed #26. Still need to make the associated front end changes. Refactored some of the controller methods.