optimized event handling. Brought size down to 4075/7883.