fixed license header
minor bug fixes in new api
better error reporting
update to latest version