Added types of commands, better commenting