Made include_config() more efficient, and fixed a memory leak.