Gapcon refactor