This is the function everything moved into.