Port checker refactored