Clean up syntax and missing ;
Refactor and comment -- seprate concerns between view and controller