changes format and style nits, fixes event handler