A bit of apple script cleanup.