Implemented hardware instancing and refactored raterizer.