Major update with lots of tests, semi-final version of Sonar