minor bugfixes and stylistic corrections