added sending sms functionality and slight refactors