Moved functions around.