Refactor mc2c functions to return strings instead of printing.