Added simulator loop and put a search for uninitialized processes in the beginning