Cleaned up commands' code.