New refs and tidying