Added docstrings to most of the functions. Also separated the nipype workflow build as it's own function.