Improve public API
Add test