add headers to the scripts

Some bugsfixes