Added test case for #27

...and some minor cleanup since I was in there.