Refactored a few API accessors.