Fmt: tabs -> spaces
Trivial: unused import
Add implicit conversions for memoize
Use implicit conversion