Modularized the CLI and commands into classes