Updated internal functions.