Removed check_port method