Added correct manipulating with stack in parsing process.
Moved values from parse_string to main.