Comments and a few bugfixes