Move function definition to top of file to be consistent.