Use explicit types for branch and index instead of uint32

It is easy to mix up the index and branch if they are both uint32. Introducing explicity types for these makes it impossible to confuse them by mistake.