Made model run code on it’s own queue and put locks around it to stop race conditions.