Fixed some errors

Implemented Event stack.