Used constants
Improved joining strategy
Added DomainQueryFactory
Added basic test