Various code structural changes.
Restructured cache_file and added ability to cache ignore files over a certain size.