cleaup and stdout/stderr changes
reduce walltime
Cleanup for working code.