Removed some debug statements
Added some missing backref and cascade statements