Small changes for cleaning up code and enabling refractive index AO mechanism.