Separated header and setting view from app

Refactored scripts and separated into separate scripts loaded through
RequireJS