Merged changes from test branch. Added completely different way to render and optimizing the drawing.

merged changes from TestBranch