Added all Teddy's Code from the Second 10k
Fixed the script so that it should be able to run (soup to nuts) without significant intervention.