split commands into file

The main file loses  a few thousands of lines!

Though it's untested, so that's why it's in a pull request.

Can someone test it? :o