Added Phernalia Registry, changed event handling a little bit.