Fixed some bugs in Stencil. Enabled largeHeap.