Api updates

First pass at the API changes. The test_pv_slice() test works.