Addressing comments and simplifying things. Renamed variables to clarify their roles
Added a new function "helper" and used them in LU, lower_triangle and upper_triangle