Removed the use of getOrElse to avoid Scala wrapper for every call.