Refactor Sequence class.

Implement addHandler() and save() with support for deferred and
non-deferred handlers.