Parsecommands

Redesigned parse_commands method using a dictionary instead of a bunch of if statements. Don't know yet if this is a better design.