clean up, better error log, memoizee cache