I'm caching $parent and parentOffset because both are used twice.