Implemented deep merge