sort notifications according to date, fix all the silly bugs