add delete and create, clean generated code
fix refresh tab