Went with a different approach after reading about settings in js.