Move settings to script (more reliable)