WP-350 re-factoring these changes to fit in with existing flow