A wide variety of performance tuning enhancements.

Links are generated as lazily as possible. Where eager loading is needed, suchas when there are join tables, the appropriate undeferring is performed toachieve what is needed.Categorizations have also been reenabled, and they are eager loaded.