cleans up master script