some minor bugfixes and more comments...