Add some more functionality, and add more tests