More refactoring for dynamic port consistency