(refactor) extract serving files and calculating filenames.