Big update in line with changes in core