Added support for arrays and numbers for output.