Refactor benchmarking and core module.