Refactoring - rewrote the API using class based views.