Rewritten command execution routines