Fix .refresh method

If user won or lost .refresh method didn't work
Refactoring

Add comments
Small optimizing