Move function to the only file that uses it.