Add a convenient function for canceling timer.
Add some comments for classes.