Refactor console commands to classes taht can be reused elsewhere

1 job for main
latest