Settings cleanup and new global event handlers