Implemented most MPI stuff to main, working on init_flag, added parallel