Cleaned the cli and added documentation

Closes #729