Add some more tests for library code