Removed unused imports, added some missing docstrings