Understanding Classes and its Fields in Scala