Begin refactoring to modules
Refactor to module system. Begin work on CLI
Finish merge