drop unused PortStatus enum from Handler class
lift duplicated variables out of adjacent blocks