Library with some more error checking and such.