Refactored endpoints into own module