Small adjustments on API and more tests