Changing some buildFromSpec dsl to objects