cleaning up API, fixing paging, adding assert.h