Refactor to use special registerInternal API