Tweaking phantom performance

While indexing an application Phantom was using a huge amount of memory, causing a crash. I've figured out that the crawler was opening new pages for each url, but none of then were being closed causing a memory heap.