Refactored to have each API endpoint translate into a class that extends ApiEntity;.