rename refactor some classes. minor stats and fixes for cache code.