remove legacy directory cleanup code