cleaned up code and removed unnecessary imports from header