Remove helper method and refactor tests