Renamed several functions according to Scala's naming convention