bunch of changes to models, resource id stuff