prefetch optimization and misc cleanups, libjansson 2.6