Removed done flag as it was no longer used.