Initial implementation of the internal testing functions.