[WPNS] Move functionality to delivery.rb