Refactor ModelManager