Add uninstall feature.

I rebased my changes. I don't have devices to test now, so can you please verify if it works? Thanks.