Template and Routing Fixes

Fixed some display issues in the template and a javascript routing bug.