Revamped/refactored model framework with file-attachment support