Refactored endpoint constants, tests