Cleaned up code and imports