Refactored, Created an endpoint, hyperlinked api