Refactored for package converter and test.