Cleanup, Refactor, and a few more tests

Cleanup, Refactor, and a few more tests