My version to date, with style changes.