Refactor transport base classes and stub implementation