Sample apps + Misc bug fixes and enhancements