improved comments (and small bugfixes)