Renamed main to index state to be consistent.
Cleaned up routes.