bug fixes and initial comments