Add explicit test case for #30

Fixes #30, also cleaned up some other test cases