Added documentation, removed waitfor_task
Added documentation for lib/__init__.py and lib/misc.py.

Added a index.rst file for the cli library. Compiling in sphinx does not work for now.
Added import error prevention and removed some functions from misc.py
Added comments for the return parameters and corrected some spelling misstakes.
Merge pull request #773 from swuest/cli_cleanup

Cleaned the cli and added documentation