small scripts improvements