Release of previously unpublished code

This is the upload of code I originally wrote in 2011. I will clean it
up more, add documentation, and missing functionality in the coming
months.