Work in progress: Added JSON validation/argument=list-generation function, this ensures that the incoming JSON commands match the expected structure while at the same time building an arguments array for the action functions to use.