Move functions to separate files for clarity.