The shared instance code is almost working.