Refactor benchmark scripts.