Modified clone() to correctly handle Arrays and Dates and added tests to show it