Added support for browser history and direct URLs.
Moved messages out of mailbox.php to fix slow state changes.
Fixed calls to showMessage to reflect new definition.