Cleaned up action-setting button visibility code