trying to fix the memory leak
Merge pull request #543 from adamtracymartin/clean_archi

Fixed a few bugs
simplifies logic to detect screens and events
fix the edit match link in the log for arena
refactoring
better logic in rank detection 

(do not override rank if not detected anymore, 
but change the rank if it has changed)