Merge pull request #534 from mcmonkey4eva/master

Update some things, fix some minor things...
Performance optimisations and cleanup