Added output format (Object or Array) + Improvements in Exception Class and in the error messages