Refactor active tool setting.