First part of fixing up my scripts.