Reworked preferences reference a bit. Still not working, so left unused at the moment