What are these scripts doing and why are they needed?