Added some additional tunnel logic and fixed events.