Added docstring and refactored return values for all bash functions

All functions have now docstring (except launch_config_assistant, deleted in #73).
The return values have been refactored: each error returns is own error code instead of the sub-command error code.