Tide up scripts

Organising code and adding some stuff mentioned on the slides