Added some basic tests to newly redesigned library. Test coverage is still less than satisfactory.