Added game counter, fixed some bugs