Refactor lots with the Python impl, and working again.