Removed dependency on gridlock and implemented own events.