Added capture layer to map (and removed some dead code)