added message deletion & misc security fixes