converted notifications.js into a Service (fixes #65)