Know before you sell: Tax and legal considerations