Better modularity in command handling