General updates

Adds lots of code comments. Adds support for the IClock adapter and
supporting classes. Cleans up a little bit of the messaging code.