The logic is a bit hairy to follow. Can you create two functions `addCalls` and `removeCalls` to make it a bit more obvious.