Safer code, better error reporting, remove unused code.

Uses binary_to_existing_atom, rather than binary_to_atom.
Verifies that the request contains a supported action,
and that all required parameters for that action are provided.
If verification fails, returns either a list of valid actions,
or a list of parameters missing from the request.
Removes getgame function.