Moved main loop to function and placed function call in switch/case block.  Finished 1D initialization and output
fixed merge conflicts