Refactoring so that more stuff can be pulled out into parent build