port more of the common.model, fix lint errors