Hello,
Welcome to ehealthforum and thanks for writing
Pills are the best medication for regularising periods,they can shorten the periods but regularise them.Since you took the pills for short duration of time it would not have caused much changes in the cycle.After stopping the pills it might take few months until the cycles are regularised as again there would have been hormonal fluctuations in the body.
Weight changes,exercise and stress do contribute a lot in the menstrual cycle.It might also be possible that you are having premenopausal symptoms.Relax and avoid taking medications irregularly.Consider visiting a Gynaecologist for detailed evaluation.
Take care!