Cleanup, JS check, session

Cleaned up messy code, added some clarification comments, added session
support and disabled page for those who do not have JavaScript active.