redoing the logic of the views andadded the templating code in main.js; eliminated the app variable
simplifying the views and html
minor changes to get input view working with api endpoint