tweaks for gareth
compile v3
Merge branch 'refs/heads/v2' into v3
tidy up a bit