Added functionality to process multiple commands after each other.