High-level api and examples updated.