upgrade to new model compiler
update the code for new update algorithm
Add checking & recording revid