More minor changes

This has been rebased against the latest upstream/master so no worry about built files.