Adds CLI interface and a slew of other improvements