Refactors function code to classify conditions for
submenu option creation on batch view