Some bug fixes, new features, performance improvements, and updated example code