Rewriting main player update loop