After much hair loss, I think I've managed to get the shift register to work... hopefully... This is a template, so whack it in the templates folder