Main and ports