Given that scripts tend to grow as variations in the requirement come along, it is important that they are as maintainable as possible. The use of lots of global variables for static storage causes maintenance problems because the code and variables are not in the same place, creating the need to have to search a growing amount of code to solve functionality coded in a localised place. Encapsulation is key to why O-O solves complexity and closure is a related concept.