Cleaned up imports and documented all classes and functions.