(refactor) Move impls into a module and separate files.