Internal API refacting