Right, I've gone through and commented, sorted a few issues and tidied things up