Refactor models to refer to objects by Long ID