Splitted gateway factory from gateway registry function, and made sure all parts are in the ioc