refractored playstate, more comments added