Implemented hardware instancing and refactored rasterizer.