Cleaned up code, imports, formatting