Move model code out of presenter