I might finish this later. i dont really know at this point.
I made all of this, mate. 3/20/17 - slight update, worked out a few things. 3/21/17 - added a comment in the coding to explain how things work at the moment, and polished things a little more again.