Refactor templates and build jasmine page with correct headers.