fix type comparison to account for aliasing
handle for loop programmatically
inheritance hierarchy to allow more terse DOM insertions
move stmt container logic