Cleaned up code an imports.