Refactored constructor and redo some tests