Refactor tests & improve coverage