Latest changes, trying to include Marco's improvements...