Implement more functions, add more tests.