Moved isSg... declarations to a more useful location.