Move all command stuff to a separate module.

Signed-off-by: Kalman Olah <hello@kalmanolah.net>