Added component globals and much better event gluing