Moved internal functions to private.