clean code and made a better using of rendering tools
close #239 and hight improve render functionalities