Refactor loom package.