Refactor code, using Request and Response from rest framework
Adding optional format suffixes to url