Added event handlers and save handlers