Improved logic for Fireproof.stats and added events