Refactoring tests.. not complete yet.