Refactor into appropriate package.