cleaning up relation constraints, fixing docs