Changed scope of internal functions.