[setup2] fixed docstrings, made some comments more verbose, and added code to select run mode