Add a variable of commands and use it instead of getCommands() for performance

Note that I'm keeping commands.json and getCommands in the source until I can
make a more generic version of getCommands that can load commands from any valid
JSON file. This will be useful for implementing custom config files.