Moved JS controller and view into their own files.