Sorry for the big commits with bad logs, it was some really tiresome job :)
To build references in the next commit.