Refactored endpoints into their own methods.