update API
externalize PDF creation
Add test cases
merge devel