code cleanup.
Gateway: sort files by freshness.