removed unused imports, some minor edits