Improved msi and cleaned code

Now supports changing call type during the call.