Code cleanup. An option to enable/disable confirm action