Removed some unneeded includes and brought example code into conformance with the current interface.