fix more remarks
fix more remarks, and a couple of bugs too