Added documentation, cleaned up unused imports