refactor command handling
more command tweaking