bunch of shellscript and profile improvements