New api

In progress (not yet done so DO NOT MERGE).

I am redesigning the entire API to make it more easy to use, maintain and update.

This will fix issues #23, #21 and #22.