initial round of tests and bug fixes
change indentation, no non-whitespace changes