use immutable map in test for clarity; fixup style issues