Refactored and redistributed some functions.
Fix for receiving notifications not working.

First execution slightly broken on display but working effectively