Re-factored API wrapper to use indexing which makes it more elegant

and removes the ungainly request() call.