Update decode logic for nestable block elements
Refactorying source code