Updated API and examples