Optimize tips, delete and create tips when submit.