Move notification/invitation stuff to helper method
Merge branch 'notifications'