FIX: Pupil fixes

This fixes some pupillometry code, and also makes background setting (much) better.