Restructuration, addition of new methods.

Divided the wrapper into categories. Implemented additional API
methods. All the API methods are now here.