Changed MainHandler into StaticHandler.
Created separate handlers for dynamic pages.