Cleanup and fixes for packages