Added view templates and fixed routing