As talked, fixed device notifications, code refactoring