Updated CodeGenerator code after review.
Update code with changes after different reviews.
Fix coding style, switch statements indentation.