Refactor parser.params and related functions

Rename parser.getParameterById to parser.params.param, add
parser.params.assoc, rename parser.flags to parser.params.flags