Setting of the render's passes are added and some beautification and optimization of the code