Moved event handler to BMOS utilities.