tidy up and fix warnings

It's never as easy as it first looks is it?

When I went about building this for release I found various warnings etc. that I've fixed up