Fix null pointer exception and remove friend ordering on new message
Removing unsued functions