Add comments, refactor code, use latest tag.

Improve documentation of the script regarding its usage.
Support different tags in the needed repositories and use latest tag for
each one.
Refactor code to be more readable.