Refactor Endpoints to support frontend mapping