Improve structure of the push notification hack and add documentation