Adds a 'Command' parent class and refactors all the commands to use it.