Reworked the API. Extended README.