Master merged from svn trunk

I've had a go at converting the svn repo to git properly, merge this in if you think it's ok.

Cheers,
Dave