Create domain logic
Add unit tests
Merge branch 'domain' into develop