Re-arranging beginning of main()

Re-arranged initializations of functions and variables. Removed unused
variables from read_snapshot
Made delx,y,z into an array.