Port more API to the new return scheme