Implementing the call stack and fixing the write character and number functions.