fixes some issues with quaternion to euler angles and backwards. It also fixes matrix multiplication