Start fleshing out SLMap.hs.  Factor out utils into a new module.