Refactor code to prepare database recording for benchmarking...