tiddying up a bit, documentation, final code review