Add a bunch of event handlers and some default values for the images preprocesing.