Slight optimization

The lazy val should reduce computation a tad. The rest is just fussing with imports and using fold instead of map/getOrElse.