Lots of debug scripts. Will need cleanup later.