Refactored templates and changed urls.py in project to fix url routing