Clean up routes and index code