Improved getter and setter for mapping to API.