Refactoring of Match.cs + Random number fix