Cleanup of Sif{0,1,2}.cpp

Some unused functions.
Local variable 'done' wasn't being used.
Collapse it in to main functions so that it is easier to (re)move.

Functionality is unchanged, although it appears most of it isn't used or is only ever used once.
Missing while (1) here?