Improvements on #34.