REFACTOR: A loop over the remaining arguments of the console app (materials arguments) is used to get rid of the redundant if statements.