Creation of batch layout and associated logic

Amending links into batch layout page
Movement of a lot of code to the view html page more appropriate