Added a bunch of basic tests so refactoring can be done.