events refactored; keydown IE bug fixed