Changed all commands into separate classes.

The Main class needs some fixing.