Wrote tests to ensure functions work as expected.