Improved stringify to support more and nested data