Add documentation and event registration mechanism.