use std/list module for map and memberOf?; some minor cleanup