had problems with Git and this is huge

A lot of changes in this commit (which were intially 4 commits).