Refactored text renderer and added entity rendering.