Added functions. This changes a bunch of tests.
Rest of the function cases.