The analytical work (mostly) for REM paper.