Add optional "delete" flag
Updates for CDH4 upgrade