Events through factory
Added event lines to core architecture