Refactor to make tax api customizable