format code and make unknown routes redirect to home