remove unnecessary code
augment some events