Added utility method for merging objects recursively