Refactoring - putting scripts into external files