fix game ending bug
minor cleanup of timer code