Added better delete functions