some of the corrections pointed by Wouter
More corrections from Wouter implemented.
80% of Wouter's corrections incorporated