Fixed bug with updating history. Now also saves players_in_matches. Added some in-app buttons to test the database. Increased speed of inserting new records.