Refactor redpile helper method to take a list of commands