Moved old smoothgin code to package legacy3 in preparation of marginal/conditional rewrite.