Cleaned Up delete() Function