Refactored rasterizer