Adding changes from Aki's diff

Aki noted some issues the way we pull repo's and had passed on a script
to accomadate those changes. Just combing all in one to avoid issues in
upcomig monday merge