Three-dimensional aspects of flapping foils