Duplicated code

I guess keep only the render method code is enough.