Better commands registration and handling

- Improve commands registration algorithm
- Modify command registration to take activateBlock into account
- Test it on MoveToMethod* commands