Relax and be positive. You had a close shave and good that you have quit both. Take medicines and healthy diet as suggested by doctor. Cancer does not happen overnight, it is usually preceded by pre-malignancy stage.
Swelling may be due to some allergy, kindly consult doctor. Nothing to worry too much about.