Refactor test routine into module, use better test names and show more diagnostics [ref: GH#2]