Refactor code into directives, controllers and services. Fluid width layout