I submitted a paper to a mathematics journal last year and got a "revise and resubmit" type of response. I edited the paper following some of the referees' comments and suggestions, but the paper has changed quite substantially since then. I brought on a coauthor, reworked some of the basics (not at the suggestion of the referee), added a lot of material, and ended up more than doubling the length of the paper. However, certain core aspects remain from the original paper.
I would like to submit to a different journal because I feel the paper is now somewhat different and of a higher quality. I am worried though that there is some ethical obligation to stick with the original journal because of the labor that the editor and referees have already put in with the first version of my paper; otherwise it seems that labor is wasted with respect to their publishing interests.
Should I stick with the original journal, or is OK to switch?