Gateways RB re-factoring WIP