Handle multiple merge refs for octopus case
Add inputs via type-in or left-click
Fix formatting