refactor quickhull code