Removing stack parts
Some safety checks
Some safety checks
Returning number of instructions executed