Got rid of $stats as it is not used anymore. Some CS fixes.