Refactored ThriftTransportFactory. Chopped it into smaller methods with less logic