Changing the bars should not present a problem, provided that the various cables still fit. S-bar stems are completely different, as are M and H stems. The cable lengths may or may not be the same but as the S-bars are lower where the levers go, you may only have some excess length to the cables.
Having asked similar questions recently this is what I've found. The bar clamp height is slightly higher on the H stem than the S stem, both the M & P stems are lower than these. So the highest bar position is via the H stem and it has more reach than M&P but 13mm less reach than the S.
So if you put flat bars in an H stem then you would be raising them slightly over an S stem but also reducing the reach.
However the H stem hinges higher up and therefore when folded the flat bars would be further from the ground than with an S stem.
This means that if you wanted to use wider/riser bars then the H stem would give you more room, I particularly liked a stem riser solution suggest by the all knowing Kim on YACF:- http://www.ebay.com/itm/LitePro-Bic...-Folding-Bike-Light-Weight-Stem-/271290827931
This allows you to use flat bars but get the benefit of a riser bar, so you still have plenty of grip/bar area for additions. You can also angle slightly to account for the 13mm reach loss.
Cables would probably need to be adjusted to suit.