Fixes #3309 - Support deep merging of hash and array structures in smart class parameters
Refactoring values hash - will squash after review