Refactoring endpoint for fetching submissions