Refactoring and tests.
Actual application with fat jar.