Optimize uninstall function
Optimize uninstall function