Added test coverage to reach 95% and removed duplication to get below 3%