I managed to do most of the hard work for this, so if you end up using it, please credit me for making this ;)