Added basic testing and updated controller structure