Main routine for SMSplus