Made some changes to allow messages and phone call detection