add doc strings; clean up stdoutput