Added deep merge utility, restructuring