Documentation, unit tests and a few more higher order functions.