We study experimentally the effect of adding an in-line oscillatory motion to the oscillatory heaving and pitching motion of flapping foils that use a power downstroke. We show that far from being a limitation imposed by the muscular structure of certain animals, in-line motion can be a powerful means to either substantially augment the mean lift, or reduce oscillatory lift and increase thrust; propulsive efficiency can also be increased. We also show that a model-based optimization scheme that is used to drive an iterative sequence of experimental runs provides exceptional ability for flapping foils to tightly vector and keep the force in a desired direction, hence improving performance in locomotion and manoeuvring. Flow visualization results, using particle image velocimetry, establish the connection of distinct wake patterns with flapping modes associated with high lift forces, or modes of high thrust and low lift forces.