Dynamic Command Function

I made a function to generate the tempCommands lists so that we don't
have to have two sets because of the two possible command locations.  I
also fixed a slight bug that was making the @item(ItemName); subject
option still catch all the items as valid subjects.
RunCommand Function

To compact the code a little and also make it easier to add sources for
new commands I added a RunCommand function that checks the three types
of command when run.