General cleanup and *added* a debug monitor.