Handle multivalued parameters

Plus some cosmetic fixes