Improvements on the lovins implementation