Port refactoring to Halite