Clean up spaces and fix tableflip cmd