DRYed up event handlers and added localizable error strings