Updated LU code to catch out of memory exceptions

:D