Implemented stats in the stack controller.