Minor additions and more debug output.