Moved most pages to views. Implemented URL rewriting.