fix test compilation
removed unused dependencies
func instead of imperative style of max-arg
memoize is replaced by manual cache (use memoize with carefull)
fix after max-arg experiment