Wrote a few tests, need to clean things up a bit