Removed unused variables and added density to operations class