Fixed implicit solver crash when not enough memory. Code cleanup in HE_Task.cpp.