Some vaguely stable code (with the on-and-off code commented out).