Bring master up to date with proposed live version

This is the version on test on vfbdev.inf.ed.ac.uk which to all intents and purposes identical to the live version but to changes to support auto-deployment with ant only build plus some minor fixes.