Commented SQLiteDatabase and Sender, simplified code, renamed function