Move apply code as part of Targets struct