New model code for updated database working!