Fixed the API to be usable, also added an example section.