Refactor to use only one main.
Refactor to use HBase