I ended up doing just this but on LUA: an object constructor loads a map with config parameters.Thanks @dimitarvp!