Porting over junk from old library

Started the port -- I have no expectation that this will compile...at
all...