Name analysis

Hurray, name analysis is done. 
There is one orthogonal change: I moved the examples to the tests project to speed up the compile process.