Improve formatting of models module's code