Refactoring codes

Upgrade config manager;
modelap -> models