Added memoize, extend and inherits functions