refactor phase2
remove strconv
fix bug in updateMaxInstanceNum
Merge pull request #33 from xiangli-cmu/refactor_phase2

refactor phase_2