Added Panic for Out of Heap and Exit
Incorporated Bdub's feedback for speed