comments and some bugfixes