Added formatArray() and formatString() methods