Refactor delegate builder code to own class