Bug fixes and a variety of changes to debugging code.