How chemistry influences cloud structure, star formation, and the IMF