Moving a function where it belongs.