Added memoize
Added imports and headers