Improvements on #44.