Reorganize program

This fixes a race condition in the start of the program.
Since the table creation command is async, it was
possible for the program to run without all the
tables having been created. Although the table
creation will probably win the race all the time,
this makes the program better. Also make data collection
modular so other exchanges can be added in the future.