Refactor in favor of code reuse.