Consolidated the main-navigation code into the module.
Made the application resize itself.