Model running, fixing bugs and ooptimising parameters