FORGE-1060 Refactored the DTO creation logic.

This is now extracted out into a Builder.