Refectoring of data handling code into it's own model module