Further improvements to #5