Some changes in the connection of the events. Some code cleaning. Revised ROI working.