some fixes and more comments