a little cleanup in API