Refactoring codes

Upgrade config manager
modelapi -> models