Heap and permgen tweaks