Added a command repeat function
also modified some rpcalc functions to take advantage of this