When sailing upwind, pull in the jib and main the way you normally do. Then ease them out a bit. Remember the old saying: When in doubt, let them out.
As you sail upwind, try this:
First Ease the main Let it out until you get a nice "bubble" in the luff (up by the mast) which refuses to stay full.
Next Ease the jib Let it get some shape at the front. Again, telltales will tell the tale, so try to get the inside ones falling down or generally lethargic (stalled) and the ones on the outside of the jib streaming back. What you are looking for is a jib with a nice rounded front and a thinning exit to the leech of the jib.
Now Drive for speed Fall off a bit. Steer slightly downwind and don't try to head as far into the wind as you know the boat will go. Give her some air, and let that increase in air move over the sails. Steer to the heel of the boat. When you are heeling more, turn upwind slightly. Turn down when the boat stands up.
If you are racing, have the crew bring in the jib, then the main, with your increasing boat speed. Then try to head closer to the wind without losing speed.