Refactor model structs into model package.