Modify for packaging.
Update tests for packaging.