small cleanups, a little bit more documentation.