Refactored code.
More testdata and refactoring of code.