Added comments to lr.cpp