Adding stats to code, fixing black box