added testing to commands
cli tests added
format tweak
refactored cli to pass input around as a local variable
refactored cli to pass level locally
improved cli testing
improved cli testing