migrate duplicate code where it belongs and nuke file.