Improvements on #27.