Minor fixes, comments and tests.