Refactoring expand/contract on header/menu, fixes Jasmine issue, gen cleanup