Restructured engine to have proper row/column matrices