Cleanup and standardize client command logic