Implements #646
Implements #647
Merge pull request #648 from emmanuel-keller/1.5

Implements #646