Adding support for local notifications and fixing a few other small issues