testcase for #6 + cosmetic refactors

Wrote a testcase for [issue #6](https://github.com/gusaaaaa/easyparser/issues/6) and a few cosmetic refactorings.