How to remove rotation of non planar faces? I have this object, it is so far no thickness.

However there are some faces where I accidentally rotated the X and/or Y axis so now there are parts standing out on the side.

Is there a way to reset these rotations, so that the whole plane will be flat?
In Edit mode, Select all vertexes, Then press S, Y,  0  This combination scales vertexes to zero on Y axis, and will make faces completely flat in x-z plane