Corrected all matrix calculations and drawing pipeline