Updated for further testing before starting for reals.