Controller code clean up. Fix Restful callback on delete