Updating README and moving array swap to seperate file