Refactored parsing of pushed messages

Also began changes to handle notifications while activity is in the
foreground
BUGFIX: Notifications always showing