changed DOM objects geteventbit to use Event object
changed more objects to use Event object instead of hardcoded bit codes, made a lot of indentation fixes and syntax fixes