Removed unused imports etc, added meager comments to help remember