tidy up code, e.g. change case of variables and factor out MultiMap