various changes to template layout and 404 route added