Progress on functions and tests added.