Formatting fixes
Add unit test coverage for package inference.