Adapt Builder to function params storage as ptree

* Adapted Builder to function parameters storage as boost::ptree
* Fixed merge parameters function, now can deal with multi-level parameters