Fix Empty Dimension Problem
Removed lots of unused code
render tree rewrite