Modified tests so that they work with refactored code, added some new ones, one still failing