Outsourced method. Small changes in scripts.