Correct addon installation. Do a git pull if directory exists.
Correct also bad function ordering.