Mirko's comments
A few bugfixes