Remove duplicate logic

I've moved most of the duplicated logic into an Exchange class to make it easier and less error-prone for adding additional exchanges and features