Modified some of the app logic and templates