Category stats added. Code tidy.