Moves function to separate file.