Improved msi and cleaned code

Now supports changing call type during the call.
NOTE: Breaks api and backwards compatibility.
What is this diff thingy, are those it leftovers from git merge or something?