Fix some issues
Add new tests with recommanded API