Improve best file selection
Fix removing empty package groups
Merge branch 'develop'