WIP - Minor fix

The only significant change is the commit 'cca883a', the other two commits are kind of cosmetics.

/Edoardo