Listener for waking up from sleep

Created listener for waking up from sleep and cleaned up white space,
structure