Perform assorted fixes

Remove last parts of Memoization support.
Fix a few of clang provided warnings.
Fix more clang -Weverything warnings. Remove some dead code.