Refactoring the endpoints to introduce slotlock