Added deleting pm from sender, made some refactoring