Added and refined domain logic and configuration