Main now passes through left and right commands. Refactored main to dry it up.