Updated c++ interface to be more consistent and support basic iterator access to data