Updated endpoint implementations and added unit tests