Moving some stuff around for better data encapsulation.