Initial import of the mostly-already-written library that I was convinced to release