Refactoring & configurable port