refactoring; tests added, some variable and classes renamed etc.
Merge pull request #26 from jandudek/refactoring2

refactoring; tests added, some variable and classes renamed etc.