Complete rewrite of the existing scripts.

Now with better GIT support!!