Add test unit. Still needs refactor & more tests