renderer2: removed unused variables and functions, refs #321