graph: code cleanup in bucket fill