Added stat regeneration. Closed #49.