...
Use a 2D array for memoization, gives clearer code
Update HNA and Heise