Added sorting and a counter to the activities feed dropdown menu and fixed broken links when some activity is deleted.