Refactor tests, make them green!

Now use two modes for each tests with a function, instead of repeating the same test twice
Merge pull request #13 from saveman71/refactor-tests

Re-factor tests