Documentation of all functions, a few comments and 7 TODO.