Fixes and cleanup for bundle cleanup commands.