Added more stack tests and runtime error handling.
Next is set metadata