Fixes for SMS and improve parameter processing

:dancer: