some script cleanup