Modified JS to nest config object