Pace class also refered to the code using the preferences so changed the reference to point to this so that the app could run (otherwise it has errors).