Overhaul catalog preprocessor to use quadtree magic