Fix some bugs in the student view shim, add tests