Fixed StackTop, added define for NULL if it isn't defined.