Moved scripts into separate files