Do refactoring: add model package, and do some renaming.