Notification encapsulated and works with settings

Notification pushing stuff encapsulated out so it should be more useful
now. Also set it up so that notifications are only pushed when enabled
via the preferences page.