Refactoring model and file layout.