Adding events to the loader class