Updated controllers with methods and updated index.html