GATEWAY-3455: WIP - to be moved to another repo.