Modified playState and removed unneeded code