Query optimizations from the controller. Added initial pretty link paths for SEO purposes.