Moved delete function to init file