Comments and style fixes. Bugfixes
Bugfixes