The content originally appeared on: CNN New York (CNN Business)Ahead of its 2012 initial public offering, Facebook was in trouble. Its revenue growth was slowing, expenses were surging and it was falling behind competitors in the transition to smartphones and other mobile devices. But within two years, the company had managed to turn things around. In the first three months of 2014, its sales grew 72% from the prior year and profits tripled after it re-organized to be 'mobile first.' […]