nit: perhaps have this return an `Outline`, and have the caller be responsible for calling `toMap()` on it?