Code optimization and slight gui changes for Statistics Panel