Return promise for attaching/detaching models
Add better debugging for attach/detach