Rename files and move a few functions around.