Refactor currency converter