Made scripts slightly less hacky.