Use separated function to resolve command and related arguments