Assign IDs to each heading for easy XPATH select

Also fixed previous broken build.

Comments here include some hideous XPATH attempts that I was making before realising that it was easier to simply tag the headings to select between them