Turns maps into Scala case classes