Added a lot of tests, but still need quite a few more. TODO flagged for items to get to later