Cosmetic refactoring

* Changed the API calls to be more sensible & simple and free of
  redundancy.