Add some fixes after review by Andreas Schroeder