Refactor config to receive JS object in constructor

Passing YAML string is not always convinient way to create desired
config file.