Code block node

Changes Made:
---

1. Fix for CBN undo crash which was caused by my previous pull request.

2. Regress Test failure fix

3. CBN delete empty node now changed to work with command framework 

4. Fix for run dynamically CBN crash