Sepparate steps for buffering input.
Add commented code for remembering event values.
Add evaluate reference solution. Tests needed.
Repair reference evaluation. Referencing enabled.