Removed some not working code and added the stack pointer to the IR itself