more api cleanup so that R will work again