Added type aliases
Moved into a separate BadRow case class
Added an isolateGoods function alongside isolateBads