Fixed the render method.
Added javadoc.