Modularized a bit, added total stats