Using getter instead of variables scope.

This is probably a better way to get those values. It gets the value
using a standard OOP technique rather than exploiting a common
implementation. Still - this is a difference in API.