Added C locals, implicit types, and refactored some Cmd methods.