Fix and simplify language block nesting

1. Handle codeblock count on codeblock constructor
2. Remove old code that handled codeblock nesting
3. Added imperative testcases for CBN
Remove comments
Merge pull request #1819 from junmendoza/imperative

Fix and simplify language block nesting