More work splitting up the html and jas code into proper templates and includes