Finished all functions. Add a simple functional test.