Cleaner re-push of the changes earlier submitted.

Apologies, I'd incorrectly merged the files on my previous pull request. This one's a lot cleaner. 

I had a second look at the code and the changes I'd made in some of the files were irrelevant. I'd been requested to remove a couple of anchor links from staging, but as it turns out these had been added off the track, and so didn't exist in the version I forked anyway.

Thanks, Dan