More script cleanup