Move functions between files according to their usage.