Reformated the code to the guidelines
Toast fix and better & faster polling for new events