heavy changes of the API, improved documentation