Get the mast straight up and down for now.
Your problem: I think you're sheeting in too hard on your main and
jib.
Here is a trick for trimming:
Jib: ease the sheet (relax the
lines) until the sail just begins to loose shape and flap a tad, then bring it back in slightly and you'll be good. If you have telltales, that makes it a little more easy and complicated all at the same time.
Main: ease the sheet until you notice a little bubble forming on the front seam of the sail like the wind is blowing back the wrong way on it. This is the point where it would start to luff (or flap) if you let it out anymore. then draw in the sheet just a smidge to where the sail forms that nice curve again, and just a hair more for measure. If you have telltales along the trailing edge of the mainsail, they will fly straight out at this point.