Simplify code for generating forwarded ports
Merge classes that belong together