Added in MIT Licence.
Start of very crude implementation. Its been a while!