Parsing complete

Fixed errors with parsing more than 2 lvl. Algorithm was optimized.