Initial commit from some code I wrote a while back.