further script cleanup