added begin and end blocks
1. fixed nested if and while constructs 2. fixed successor node for if statement without the else construct